<?php
include 'config.php';
$url='https://developer.toutiao.com/api/apps/jscode2session?appid='.$appId.'&secret='.$appSecret.'&code='.$_POST['thecode'];
$data=json_decode(file_get_contents($url), true);
 
$info=array('openid'=>$data['openid']);
echo json_encode($info);

 